Optimal. Leaf size=46 \[ -\frac{a (B+i A) \log (\cos (e+f x))}{f}+a x (A-i B)+\frac{i a B \tan (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0308762, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3525, 3475} \[ -\frac{a (B+i A) \log (\cos (e+f x))}{f}+a x (A-i B)+\frac{i a B \tan (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3525
Rule 3475
Rubi steps
\begin{align*} \int (a+i a \tan (e+f x)) (A+B \tan (e+f x)) \, dx &=a (A-i B) x+\frac{i a B \tan (e+f x)}{f}+(a (i A+B)) \int \tan (e+f x) \, dx\\ &=a (A-i B) x-\frac{a (i A+B) \log (\cos (e+f x))}{f}+\frac{i a B \tan (e+f x)}{f}\\ \end{align*}
Mathematica [A] time = 0.0328826, size = 66, normalized size = 1.43 \[ -\frac{i a A \log (\cos (e+f x))}{f}+a A x-\frac{i a B \tan ^{-1}(\tan (e+f x))}{f}+\frac{i a B \tan (e+f x)}{f}-\frac{a B \log (\cos (e+f x))}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.013, size = 81, normalized size = 1.8 \begin{align*}{\frac{iBa\tan \left ( fx+e \right ) }{f}}+{\frac{{\frac{i}{2}}a\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) A}{f}}+{\frac{a\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) B}{2\,f}}-{\frac{iBa\arctan \left ( \tan \left ( fx+e \right ) \right ) }{f}}+{\frac{Aa\arctan \left ( \tan \left ( fx+e \right ) \right ) }{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.73303, size = 68, normalized size = 1.48 \begin{align*} \frac{2 \,{\left (f x + e\right )}{\left (A - i \, B\right )} a -{\left (-i \, A - B\right )} a \log \left (\tan \left (f x + e\right )^{2} + 1\right ) + 2 i \, B a \tan \left (f x + e\right )}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.37139, size = 161, normalized size = 3.5 \begin{align*} -\frac{2 \, B a -{\left ({\left (-i \, A - B\right )} a e^{\left (2 i \, f x + 2 i \, e\right )} +{\left (-i \, A - B\right )} a\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{f e^{\left (2 i \, f x + 2 i \, e\right )} + f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.49454, size = 58, normalized size = 1.26 \begin{align*} - \frac{2 B a e^{- 2 i e}}{f \left (e^{2 i f x} + e^{- 2 i e}\right )} - \frac{a \left (i A + B\right ) \log{\left (e^{2 i f x} + e^{- 2 i e} \right )}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.33419, size = 149, normalized size = 3.24 \begin{align*} \frac{-i \, A a e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right ) - B a e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right ) - i \, A a \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right ) - B a \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right ) - 2 \, B a}{f e^{\left (2 i \, f x + 2 i \, e\right )} + f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]